// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import store from '@/store'
import App from './App'
import router from './router'
import urls from './router/urls'
import env from '@/env'
import api from '@/core/Api'
import config from '@/config'
import common from '@/common'
import {message, Modal} from 'ant-design-vue'
// import 'ant-design-vue/dist/antd.css'
// mixins
import authorization from './common/mixins/authorization.js'
import dictionary from './common/mixins/dictionary.js'

Vue.mixin(authorization)
Vue.mixin(dictionary)

const local = process.env.NODE_ENV === 'production' ? env.prd : env.local

window.$api = api
window.$env = local
window.$urls = urls

Vue.config.productionTip = false
Vue.prototype.$api = api
Vue.prototype.$env = local
Vue.prototype.$urls = urls
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$confirm = Modal.confirm

config.init()
console.log(process.env.NODE_ENV)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
